<link rel="stylesheet" href="css/openSpa/openSpa.css"/>

<div class="row">
	<div id="pageBody" class="col-sm-12 no-margin no-padding">
		<div id="jdInfo" class="col-sm-4 no-margin no-padding">
		</div>
		<div id="shoupaiOper" class="col-sm-8 no-margin no-padding shoupaiOper">
		</div>
	</div>
</div>
<script type="text/javascript">
    //加载资源文件
    var scripts =   [
        'js/plugin/jsonsql.js',
        'js/openSpa/jquery.service.open_table_list.js',
        'js/openSpa/jquery.service.open_table_oper.js',
		'js/openSpa/jquery.handMgn.js',
		'js/plugin/jquery.jqGrid.js',
		// 'assets/js/jqGrid/jquery.jqGrid.src.js',
		
    ];

    //全窗口变量
	var ins_argjson={};
    $(".page-content-area").ace_ajax("loadScripts", scripts, function() {
        ins_argjson.operGrid = 1;
		var session = {session:{}};
        ins_argjson.session = session.session;
        document.title = $.i18n.propJsp("开台");
		
		if($.open_table_list){
			delete $.open_table_list
		}
		if($.open_table_oper){
			delete $.open_table_oper
		}
		
		jf_retrieve();
    })
    
    function jf_retrieve(){
		//开牌列表
		$("#jdInfo").open_table_list({
			wait : wait,
			goon : goon,
			bmh : $.HSAPI_HEADERS.bmh,
			dataBack : function(data){
				
			},
			errorBack : function(){
			},
			closeBack : function(){},
			resvBack : function(data){
			},
			setIdentityInfo :function(){
			},
			showShouPai : function(bh){
				$.open_table_oper.showShouPai(bh);
			},
			hideShoupai : function(bh){
				$.open_table_oper.hideShoupai(bh);
			}
		})
		
		//开牌手牌选项
		$("#shoupaiOper").open_table_oper({
			bmh : $.HSAPI_HEADERS.bmh,
			wait : wait,
			goon : goon,
			dataBack : function(data,badgeJson,data1){
				$.open_table_list.addUnopenShoupai(data,badgeJson,data1);
			},
			pageFresh : function(){
				$.open_table_list.editOpenShoupaiArr({},"init");
			},
			errorBack : function(){
			},
			closeBack : function(){},
			selBack : function(ds){
				$.open_table_list.setJdInfo(ds)
			},
			dsBack : function(ds){
				$.open_table_list.param.ds = ds;
			}
		})
	}
	
	function wait(){
		$("#pageOverlay").removeClass("hide");
		$("#loading").removeClass("hide");
	}
	
	function goon(){
		$("#pageOverlay").addClass("hide");
		$("#loading").addClass("hide");
	}

</script>